<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"  xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:replace="_header_include::frag(~{::title},~{::style},~{})">
	<title>后台管理系统</title>
    <meta charset="UTF-8">
    <!-- import CSS -->
    <link rel="stylesheet" href="css/element-ui.css">
    <link rel="stylesheet" href="css/base.css">
    <style>
        .dialogForm .el-form-item{margin-bottom: 5px;}
    </style>
</head>
<body>
<div id="failClueManagement" class="failClueManagement mainPadding" style="display: none;">  
    <el-breadcrumb separator="/" class="elBreadcrumb marginB20">
        <el-breadcrumb-item>Home</el-breadcrumb-item>
        <el-breadcrumb-item>资源管理</el-breadcrumb-item>
        <el-breadcrumb-item>资源推送记录查询</el-breadcrumb-item>
    </el-breadcrumb>
    <el-row class="marginB20">
    </el-row>
    <div class="mainSearchBg">        
        <div class="mainSearchFormBox">
            <el-form :inline="true" class="demo-form-inline mainSearchForm" :model="form" ref="form">
                <el-form-item label="资源id:">
                    <el-input v-model="form.clueId" placeholder="资源id"></el-input>
                </el-form-item>
                <el-form-item label="手机号:">
                    <el-input v-model="form.dianhua" placeholder="手机号"></el-input>
                </el-form-item>
                <el-form-item label="推送id:">
                    <el-input v-model="form.pushId" placeholder="推送Id"></el-input>
                </el-form-item>
                <el-form-item label="sessionid:">
                    <el-input v-model="form.sessionid" placeholder="sessionid"></el-input>
                </el-form-item>
                <el-form-item label="pvid:">
                    <el-input v-model="form.pvid" placeholder="pvid"></el-input>
                </el-form-item>
                <el-form-item label="手机号2:">
                    <el-input v-model="form.phone2" placeholder="手机号2"></el-input>
                </el-form-item>
                   
                <div class="mainSearchBtnBox"> 
                    <el-button icon="el-icon-search" type="primary" @click="searchTable('form')"  class="searchBtn">搜索</el-button>
                </div> 
            </el-form>
        </div>
        <el-row>
        	<div style="padding:20px;width: 70%"><pre>{{result}}</pre></div>
        </el-row>
    </div>
    <!-- dialog -->
</div>
</body>
<!-- import Vue before Element -->
<div th:include="_footer_include :: #jsLib"></div>

<!-- import common js-->
<script th:inline="javascript">
    var ocmVM = new Vue({
        el: '#failClueManagement',
        data: function() {
            return {
                dialogFormVisible: false,
                form: {
                	phone2:'',
                    sessionid:'',
                    pvid:'',
                    pushId:'',
                    clueId:'',
                    dianhua:''
                },
                formLabelWidth: '120px',
                storeId: '',
                result: '',
                scrollTop: 0,

            }        	  
        },
        methods: {
            searchTable() {
                var param =this.form;
                if(param.phone2==''&&param.sessionid==''&&param.pvid==''&&param.pushId==''&&param.dianhua==''&&param.clueId==''){
                	this.$message({
                        message: '请输入查询条件',
                        type: 'warning'
                      });
                     return;
                }
                console.info(param);
                axios.post('/pushClueRecord/list', param)
                .then(function (response) {
                        var result =  response.data;
                        console.info(result);
                        var data=result.data;
                        if(result.data){
                        	for(var i=0;i<data.length;i++){
                        		JSON.stringify(data[i], null, 2);
                        	}
                        }
                        ocmVM.result=data;
                       
                })
                .catch(function (error) {
                     console.log(error);
                });
                
            },
            //日期数据格式化方法
            dateFormat( row, column, cellValue, index) {
              if (cellValue == undefined) {
                 return "";
              }
              return moment(cellValue).format("YYYY-MM-DD HH:mm:ss");
            },
            
        },
        created(){
        },
        mounted(){
            document.getElementById('failClueManagement').style.display = 'block';
        }
    })
</script>
</html>